/*
 * @Descripttion: 
 * @Author: voanit
 * @Date: 2022-06-09 12:11:34
 * @LastEditors: voanit
 * @LastEditTime: 2022-06-09 12:19:46
 */
export const query = (url: string) => {
  url = url.slice(1) // key=1&age=18
  const arr = url.split('&') //[key=1,age=18]
  let obj: { [key: string]: string } = {
  }
  for (const item of arr) { //item=>key=1  age=18
    let itemArr = item.split('=') //[key,1]  [age,18]
    obj[itemArr[0]] = itemArr[1]
  }
  return obj
}